/** 本单元用于导出各类错误提示以及代码 */

export default {
  /** 公共错误码 40000~49999  */
  Public: {
    db: {
      validation: "数据库验证错误:40001",
      unknown: "未知的数据库错误:40002",
    },
    json: {
      syntax: "JSON语法错误:40010",
    },
    param: {
      missing: "缺少参数:40020",
      invalid: "参数无效:40021",
    },
    token: {
      invalid: "无效的token:40030",
      expired: "token已过期:40031",
    },
    method: {
      notFound: "方法不存在:40040",
      invalid: "方法无效:40041",
      auth: "方法需要验证:40042",
      required: "方法名称为必填项:40043",
    },
    resource: {
      notFound: "资源不存在:40050",
      invalid: "资源无效:40051",
      required: "资源名称为必填项:40052",
      auth: "资源需要验证:40053",
      invalidAction: "资源动作无效:40054",
    },
  },

  // ... 其它业务错误代码
};
